﻿@model dynamic

@{
    Script.Require("jQuery").AtFoot();
    Script.Require("jQueryUI").AtFoot();
    Style.Require("jQueryUI_orchard").AtFoot();

    var url = Url.Action("RegisterShape", "Shapes", new { Area = "Contrib.Mod.AccountWidgets" });
    
    var action = "/Users/Account/Register"; 
}

<button id="open-modal-register-007">Register</button>

<div id="modal-register-bob-007" style="overflow:hidden;">

</div>

@using (Script.Foot())
{
    <script type="text/javascript">
        $(function () {
            $.ajax({
                url: '@url',
                success: function(data){
                    $("#modal-register-bob-007").html(data);
                    $("#modal-register-bob-007 form").get(0).setAttribute('action', '@action');
                    $("#modal-register-bob-007").dialog({
                        autoOpen: false,
                        hide: "fade",
                        width: 400,
                        modal: true
                    });
                    //$("#bob").show();
                }
            });

            $("#open-modal-register-007").click(function () {
                $("#modal-register-bob-007").dialog("open");
                return false;
            });
        });
    </script>
}